package com.skytech.component.crawler.scratch.base;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class IndexMapping {

    public static JSONObject CRAWLER_NEWS;
    public static  JSONObject CRAWLER_STORAGE;
    {
        CRAWLER_NEWS = JSON.parseObject("{\n" +
                "  \"news\": {\n" +
                "    \"properties\": {\n" +
                "      \"title\": {\n" +
                "        \"type\": \"text\",\n" +
                "        \"analyzer\": \"ik_max_word\",\n" +
                "        \"search_analyzer\": \"ik_max_word\"\n" +
                "      },\n" +
                "      \"content\": {\n" +
                "        \"type\": \"text\",\n" +
                "        \"analyzer\": \"ik_max_word\",\n" +
                "        \"search_analyzer\": \"ik_max_word\"\n" +
                "      },\n" +
                "      \"sourceUrl\":{\n" +
                "        \"type\":\"text\"\n" +
                "      },\n" +
                "      \"urlId\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"ruleId\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"publish\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"storage\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"timestamp\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"newsType\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"catalog\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"abandon\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"target\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      }\n" +
                "    }\n" +
                "  }\n" +
                "}");
        CRAWLER_STORAGE = JSON.parseObject("{\n" +
                "  \"storage\": {\n" +
                "    \"properties\": {\n" +
                "      \"title\": {\n" +
                "        \"type\": \"text\",\n" +
                "        \"analyzer\": \"ik_max_word\",\n" +
                "        \"search_analyzer\": \"ik_max_word\"\n" +
                "      },\n" +
                "      \"content\": {\n" +
                "        \"type\": \"text\",\n" +
                "        \"analyzer\": \"ik_max_word\",\n" +
                "        \"search_analyzer\": \"ik_max_word\"\n" +
                "      },\n" +
                "      \"sourceUrl\":{\n" +
                "        \"type\":\"text\"\n" +
                "      },\n" +
                "      \"timestamp\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"newsType\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"catalog\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"year\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      },\n" +
                "      \"sourceId\":{\n" +
                "        \"type\":\"keyword\"\n" +
                "      }\n" +
                "    }\n" +
                "\n" +
                "  }\n" +
                "}");
    }
}
